import { checkBtnPermission, useAssets } from '@/utils'
// import fteamPlugin from '@/plugin'
import { createSSRApp } from 'vue'
import App from './App.vue'
import { prototypeInterceptor, requestInterceptor, routerInterceptor } from './interceptors'
import router from './router'
import pinia from './store'
import 'uno.css'

export function createApp() {
  const app = createSSRApp(App)
  app.use(prototypeInterceptor)
  app.use(router)
  app.use(pinia)
  app.use(requestInterceptor)
  app.use(routerInterceptor)
  app.config.globalProperties.$assets = useAssets
  app.config.globalProperties.$perms = checkBtnPermission
  // app.use(fteamPlugin, app)
  return {
    app,
    pinia,
  }
}
